<template>
  <div class="compage">
    <span><p>上一页</p></span>
    <span :class="dqys == n ? 'active':''" v-for="n in zys"><p>{{n}}</p></span>
    <span><p>下一页</p></span>
  </div>
</template>
<script>
export default {
  name: "compage",
  data() {
    return {
      zts: 1,
      counter: {},
      zys: 1,
      dqys: 1,
      start_ts: 0
    };
  },
  props: {
    newslength: {
      type: Number,
      default: function() {
        return {};
      }
    }
  },
  created() {
    console.log(this.newslength)
  },
  methods: {
    
  }
};
</script>
<style scoped>
  .compage{
    width: 100%;
    float: left;
    margin: 30px 0 0 0;
    text-align: center;
  }
  .compage span{
    display: inline-block;
    height: 28px;
    border: 1px solid #d6d6d6;
    margin: 4px 4px;
    cursor: pointer;
  }
  .compage .active{
    background: #5bb756;
    border-color: #5bb756;
    color: #fff;
  }
  .compage .active p{
    color: #fff;
  }
  .compage span p{
    font-size: 14px;
    color: #666;
    line-height: 28px;
    padding: 0 10px;
  }
</style>
